#pragma once

#ifdef _WIN32_WCE
#error "CDHtmlDialog is not supported for Windows CE."
#endif 

#include "DriversInstall.h"

// CInstallDialog dialog
class CInstallDialog : public CMultiPageDHtmlDialog
{
public:
	CInstallDialog(CWnd* pParent = NULL);   // standard constructor
	virtual ~CInstallDialog();
// Overrides
	HRESULT OnButtonOK(IHTMLElement *pElement);
	HRESULT OnButtonCancel(IHTMLElement *pElement);

// Dialog Data

protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	virtual BOOL OnInitDialog();

	DECLARE_MESSAGE_MAP()
	DECLARE_DHTML_URL_EVENT_MAP()
public:
    HRESULT OnAcceptanceClick(IHTMLElement* pElement);
    HRESULT OnDisagreementClick(IHTMLElement* pElement);
    HRESULT OnForwardClick(IHTMLElement* pElement);
    HRESULT DoAboutBox(IHTMLElement* pElement);
    virtual void OnCancel();
    virtual void OnOK();
protected:
    HICON m_hIcon;
public:
    virtual STDMETHODIMP GetHostInfo(DOCHOSTUIINFO* pInfo);
    afx_msg void OnPaint();
    afx_msg HCURSOR OnQueryDragIcon();
    afx_msg void OnSize(UINT nType, int cx, int cy);
    afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
    virtual STDMETHODIMP ShowContextMenu(DWORD dwID, POINT* ppt, IUnknown* pcmdtReserved, IDispatch* pdispReserved);
    bool m_bNoBreakStage;
    afx_msg void OnClose();
    afx_msg void OnDestroy();
    virtual void OnDocumentComplete(LPDISPATCH pDisp, LPCTSTR szUrl);
    EPageState m_ePageState;
    bool m_bAcceptance;
    CString m_sForwardImageSRC;
    CString m_sBackImageSRC;
    CString m_sFileVersion;
    CString m_sCopyRightDates;
    CString m_sStatusStr;
    CString m_sInfFilePath;
    bool m_bRebootNeed;
    CString m_sDriverFolder;
    CString m_sCoInstallerPath;
    HMODULE m_hCoInatallerModule;
    PFN_WDFPREDEVICEINSTALL m_pfnWdfPreDeviceInstall;
    PFN_WDFPOSTDEVICEINSTALL m_pfnWdfPostDeviceInstall;
    PFN_WDFPREDEVICEINSTALLEX m_pfnWdfPreDeviceInstallEx;
    PFN_WDFPREDEVICEREMOVE m_pfnWdfPreDeviceRemove;
    PFN_WDFPOSTDEVICEREMOVE m_pfnWdfPostDeviceRemove;
    CString m_sDriversFolder;
    HRESULT OnBackClick(IHTMLElement* pElement);
    HRESULT OnBrowseFileClick(IHTMLElement* pElement);
    CString m_sDistributiveFolder;
    bool m_bTestModeInstalled;
    bool m_bTestModeInstalling;
    bool m_bRootCertExist;
    bool m_bRootCertInstalled;
    bool m_bTrustedPublisherCertExist;
    bool m_bTrustedPublisherCertInstalled;
	CString m_sOEMInfFile;
};
